
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">

    </style>


    <script type="text/javascript">
    	//取消冒泡的兼容性写法
    	function cancelBubble(event) {
			//非IE
			if (event.stopPropagation) {
				event.stopPropagation();
			} else {
				event.cancelBubble = true;
			}
		}
		/**
		* 事件捕获的兼容性写法
		*/
		function addEventListener(obj, type, fun){
			//非IE
			if (obj.addEventListener) {
				obj.addEventListener(type, fun, false);
			} else {
				obj.attachEvent("on" + type, fun);
			}
		}
		/**
		* 事件监听卸载的兼容性写法
		*/
		function removeEventListener(obj, type, fun){
				// 非IE 
				if (obj.removeEventListener) {
					obj.removeEventListener(type, fun);
				} else {
					obj.detachEvent("on" + type, fun);
				}
			}

    
	</script>

</head>
<body>

</body>
</html>
